import { fetchData } from "@/services/name";
// export default function * fetchUserName({ payload }: any, { call, put, seclect }: any) {
//     const response = yield call(fetchData);
//     const callName = response.data[0].author;
//     yield put({ type: 'callsetName', payload: callName })
// };

const fetchUserName = [
    function *({ payload }: any, { call, put,seclect }: any) {
        const response = yield call(fetchData);
        const callName = response.data[0].author;
        yield put({ type: 'callsetName', payload: callName })
    },{type: 'takeLatest'}
];
export default fetchUserName

//{type:'takeEvery'}
//{type: 'takeLatest'}
// {type: 'throttle', ms: 5000}
